<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  

  
  <title>我的第一篇博客 | Hexo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="我的第一篇博客 123456789101112安装hexo：cnpm install hexo-cli -g初始化项目：hexo init blog安装hexo-deployer-git：cnpm install hexo-deployer-git --save清空网站文件：hexo clean生成网站文件：hexo g(generate)预览博客：hexo s(server)上传博客：hexo">
<meta property="og:type" content="article">
<meta property="og:title" content="我的第一篇博客">
<meta property="og:url" content="http://example.com/2020/12/08/my-first-blog/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="我的第一篇博客 123456789101112安装hexo：cnpm install hexo-cli -g初始化项目：hexo init blog安装hexo-deployer-git：cnpm install hexo-deployer-git --save清空网站文件：hexo clean生成网站文件：hexo g(generate)预览博客：hexo s(server)上传博客：hexo">
<meta property="og:locale" content="en_US">
<meta property="article:published_time" content="2020-12-08T01:43:50.000Z">
<meta property="article:modified_time" content="2020-12-09T06:29:01.288Z">
<meta property="article:author" content="xiaoma">
<meta name="twitter:card" content="summary">
  
    <link rel="alternate" href="/hexo-blog/atom.xml" title="Hexo" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  
<link rel="stylesheet" href="/hexo-blog/css/style.css">

<meta name="generator" content="Hexo 5.2.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/hexo-blog/" id="logo">Hexo</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/hexo-blog/">Home</a>
        
          <a class="main-nav-link" href="/hexo-blog/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/hexo-blog/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://example.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-my-first-blog" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/hexo-blog/2020/12/08/my-first-blog/" class="article-date">
  <time datetime="2020-12-08T01:43:50.000Z" itemprop="datePublished">2020-12-08</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      我的第一篇博客
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>我的第一篇博客</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">安装hexo：cnpm install hexo-cli -g</span><br><span class="line">初始化项目：hexo init blog</span><br><span class="line">安装hexo-deployer-git：cnpm install hexo-deployer-git --save</span><br><span class="line"></span><br><span class="line">清空网站文件：hexo clean</span><br><span class="line">生成网站文件：hexo g(generate)</span><br><span class="line">预览博客：hexo s(server)</span><br><span class="line">上传博客：hexo d</span><br><span class="line"></span><br><span class="line">生成并上传博客：hexo g --d</span><br><span class="line"></span><br><span class="line">创建博客：hexo new &quot;blog-name&quot;</span><br></pre></td></tr></table></figure>

<h4 id="添加ssh"><a href="#添加ssh" class="headerlink" title="添加ssh"></a>添加ssh</h4><ol>
<li>码云官网注册账号（建议使用邮箱）</li>
<li><ol>
<li>生成公钥：ssh-keygen -t rsa -C “<a href="mailto:&#x78;&#x78;&#120;&#120;&#120;&#64;&#x78;&#120;&#x78;&#120;&#x78;&#x2e;&#x63;&#111;&#x6d;">&#x78;&#x78;&#120;&#120;&#120;&#64;&#x78;&#120;&#x78;&#120;&#x78;&#x2e;&#x63;&#111;&#x6d;</a>“ </li>
<li>查看公钥：cat ~/.ssh/id_rsa.pub</li>
</ol>
</li>
<li>将公钥复制到 码云-个人中心-设置-ssh密钥管理-添加密钥 并提交</li>
<li>验证密钥是否可以连接：<ol>
<li>git bash </li>
<li>ssh -T <a href="mailto:&#103;&#101;&#116;&#64;&#x67;&#101;&#116;&#x65;&#x65;&#x2e;&#99;&#111;&#109;">&#103;&#101;&#116;&#64;&#x67;&#101;&#116;&#x65;&#x65;&#x2e;&#99;&#111;&#109;</a></li>
</ol>
</li>
</ol>
<h4 id="修改主题"><a href="#修改主题" class="headerlink" title="修改主题"></a>修改主题</h4><ol>
<li>hexo官方主题：<a target="_blank" rel="noopener" href="https://hexo.io/themes/">https://hexo.io/themes/</a></li>
<li>将下载的文件放在 themes  目录下</li>
<li> _config.yml 文件中修改 theme配置为文件夹名</li>
<li>预览： hexo clean - hexo g - hexo s </li>
</ol>
<h4 id="注意："><a href="#注意：" class="headerlink" title="注意："></a>注意：</h4><ol>
<li>码云部署样式加载问题<ol>
<li>仓库名 和路径 需要一致</li>
<li>公开</li>
<li>语言选择javaScript</li>
</ol>
</li>
</ol>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://example.com/2020/12/08/my-first-blog/" data-id="ckifbomax0000iktvf448gb74" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
  
    <a href="/hexo-blog/2020/12/08/hello-world/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">Hello World</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    

  
    

  
    
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/hexo-blog/archives/2020/12/">December 2020</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/hexo-blog/2020/12/08/my-first-blog/">我的第一篇博客</a>
          </li>
        
          <li>
            <a href="/hexo-blog/2020/12/08/hello-world/">Hello World</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2020 xiaoma<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/hexo-blog/" class="mobile-nav-link">Home</a>
  
    <a href="/hexo-blog/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  
<link rel="stylesheet" href="/hexo-blog/fancybox/jquery.fancybox.css">

  
<script src="/hexo-blog/fancybox/jquery.fancybox.pack.js"></script>




<script src="/hexo-blog/js/script.js"></script>




  </div>
</body>
</html>